package com.zkthink.ceres.pay.wechat.util;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

/**
 * <p>
 *
 * </p>
 *
 * @author vivi.huang
 * @since 2020/5/23
 */
public class FileUtil {

    public static String readString(String path) {
        BufferedReader in = null;
        try {
            in = new BufferedReader(new FileReader(path));
            String str;
            StringBuffer sb = new StringBuffer();
            while ((str = in.readLine()) != null) {
                sb.append(str);
            }
            return sb.toString();
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            try {
                in.close();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
    }
}